# -*- coding: utf-8 -*-
"""
 @Time    : 2021/1/26 下午5:47
 @Author  : tgy
 
"""
import itertools


def my_range(n):
    while True:
        yield n
        n +=1

if __name__ == '__main__':
    ...
    for i in itertools.islice(my_range(40),10,20):
        print(i)